﻿using System;
using System.Collections.Generic;

using System.Text;
using System.Data;
using System.Data.SqlClient;

namespace Manager.DataAccess
{
    class AccessData
    {
        static SqlConnection _conn = new SqlConnection();

        static AccessData()
        {
            _conn = new SqlConnection("Data Source=MINH-PC;Initial Catalog=DucMinh_Hotel;Integrated Security=True");
        }

        public static SqlConnection GetConnect()
        {
            if (_conn.State == ConnectionState.Open)
                _conn.Close();
            _conn.Open();
            return _conn;
        }
    }
}
